package org.linlinjava.litemall.db.service;

import org.linlinjava.litemall.db.dao.AgedmallLgMissionManRecordMapper;
import org.linlinjava.litemall.db.dao.AgedmallLogisticsPackageInfoMapper;
import org.linlinjava.litemall.db.domain.AgedmallLgMissionManRecord;
import org.linlinjava.litemall.db.domain.AgedmallLogisticsPackageInfo;
import org.linlinjava.litemall.db.domain.AgedmallLogisticsPackageInfoExample;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AgedmallLogisticsPackageInfoService {
    @Resource
    private AgedmallLogisticsPackageInfoMapper agedmallLogisticsPackageInfoMapper;
;

    public List<AgedmallLogisticsPackageInfo> getShipBySubOrderNo(String subOrderNo) {
        AgedmallLogisticsPackageInfoExample example = new AgedmallLogisticsPackageInfoExample();
//        example.or().andDeletedEqualTo(false)
//                .andPackageTypeEqualTo(LogisticsPackageConstant.PACKAGE_TYPE_SHIP)
//                .andSubOrderCodeEqualTo(subOrderNo);
        return agedmallLogisticsPackageInfoMapper.selectByExample(example);
    }

    public AgedmallLogisticsPackageInfo queryByShipSn(String shipSn) {
        AgedmallLogisticsPackageInfoExample example = new AgedmallLogisticsPackageInfoExample();
        example.or().andDeletedEqualTo(false)
                .andShipSnEqualTo(shipSn);
        return agedmallLogisticsPackageInfoMapper.selectOneByExample(example);
    }

}
